Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: SFDP conformance checks #10

Merged
merged 10 commits into from
Jan 6, 2024
Merged

Fix: SFDP conformance checks #10

merged 10 commits into from
Jan 6, 2024

Conversation

dragonmux
Copy link
Member

This PR addresses an issue found and reported by ALTracer on Discord where some devices report mismatching length and SFDP Basic Parameter Table version information. It was determined in the process that the length information is in fact correct and should be trusted in place of the version information when a conflict occurs and the length is shorter than it is expected to be, and the version trusted otherwise.

This PR implements new checks to verify the length information against the version information and correct whichever one is wrong, warning the user that this has had to happen in the process.

Additionally, this PR fixes a problem we spotted with the SPI Flash write process due to the sector erase opcode never being or'd in to the command sent. This would have meant that writes would only work with already empty devices.

@dragonmux dragonmux added Bug Confirmed bug Action: SFDP Something related to the SFDP support labels Dec 12, 2023
@dragonmux dragonmux added this to the v1.0 milestone Dec 12, 2023
@dragonmux dragonmux requested a review from esden December 12, 2023 17:45
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Attention: 92 lines in your changes are missing coverage. Please review.

Comparison is base (9082209) 0.00% compared to head (d306d26) 0.00%.

Files Patch % Lines
src/sfdp.cxx 0.00% 79 Missing ⚠️
src/include/sfdpInternal.hxx 0.00% 9 Missing ⚠️
src/include/spiFlash.hxx 0.00% 2 Missing ⚠️
src/actions.cxx 0.00% 1 Missing ⚠️
src/spiFlash.cxx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main     #10   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         34      34           
  Lines       1737    1812   +75     
  Branches     549     562   +13     
=====================================
- Misses      1692    1781   +89     
+ Partials      45      31   -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dragonmux dragonmux force-pushed the fix/sfdp-conformance-checks branch from 6083979 to d306d26 Compare December 12, 2023 21:38
Copy link
Member

@esden esden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@esden esden merged commit b2cba8a into main Jan 6, 2024
40 checks passed
@dragonmux dragonmux deleted the fix/sfdp-conformance-checks branch January 6, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Action: SFDP Something related to the SFDP support Bug Confirmed bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants